<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions" xml:lang="en"
	lang="en">

	<head>
		<title>My Facelets Page</title>
		<meta http-equiv="keywords" content="enter,your,keywords,here" />
		<meta http-equiv="description"
			content="A short description of this page." />
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<!--<link rel="stylesheet" type="text/css" href="styles.css">-->
		<link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/main.css" media="screen"></link>
		<link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/css.css"></link>
		<link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/work.css"></link>
		<link href="../css/public.css" rel="stylesheet" type="text/css" media="screen"/>
		<link href="../css/ui-lightness/jquery-ui-1.7.2.custom.css" type="text/css" rel="stylesheet" />	
		<script type="text/javascript" src="../js/jquery-1.3.2.min.js"></script>
		<script type="text/javascript" src="../js/jquery-ui-1.7.2.custom.min.js"></script>
		<!-- menu -->
		<script type="text/javascript">
			jQuery.noConflict();//与JSF搭配需要这句话，不然会有冲突
			jQuery(document).ready(function(){
				jQuery("#left").accordion({ header: "h3" ,active:1});
			});	
			//导航菜单高量显示	 
			//<![CDATA[  
				function sel(obj)
				{
					var menu_top;
					if(obj.id=="home_0"||obj.id=="home_1"){
						menu_top="home";
					}
					else{
						menu_top=obj.id.substring(5);
					}
					//alert(menu_top)
					var lis=top.topFrame.document.getElementsByTagName("li");
					//alert(lis.length);
					for(var i=0;i<lis.length;i++)
					{
						//alert(lis[i].id);
						if(obj!="home_0"&&obj!="home_1"){
							menu_top=replaceStr(menu_top,"Add","Management");
						}
						//alert(lis[i].id);
						lis[i].style.background="";
						if(lis[i].id==menu_top)
						{
						lis[i].style.background="#00f";//#f3c3f3; #00f
						}
					}
				}
				/**  
				 **将所有的字符串fromStr替换成toStr  
				 */  
				 function replaceStr(mainstr,fromStr,toStr){   
				   //第二个参数中的 g 表示全部匹配,i表示忽略大小写   
				  //var reg = new RegExp("test","gi");   
				  var reg = new RegExp(fromStr,"g");   
				  var result=mainstr.replace(reg,toStr);   
				  ///alert(result); //全部替换   
				  return result;   
				 }  

				 function refresh(){
						var o=Math.random();	
						window.parent.frames["menu"].location.href="../template/left_menu.faces?random="+o; 
				}
					
				 //菜单背景图片切换
				 function tableImg(imgId,imgId1,imgId2){
					 //alert(imgId1);
					 var bgImg=document.getElementById(imgId);
					 var bgImg1=document.getElementById(imgId1);
					 var bgImg2=document.getElementById(imgId2);
					 bgImg.src="../images/menu2_icon_up.gif";
					 bgImg1.src="../images/menu2_icon_down.gif";
					 bgImg2.src="../images/menu2_icon_down.gif";
					 //alert(bgImg1.src)
					 //alert(bgImg1);
					// bgImg.src="../images/menu2_icon_up.gif";
				   //  bgImg1.src="../images/menu2_icon_down.gif";
					
					/* 
					var bgImg=document.getElementById(imgId);
					//alert(bgImg.src)
					//javascript中, 检测是否包含特定的字符串
					var regu="^menu2_icon_up";   
  					var re=new RegExp(regu);     
					if(bgImg.src.indexOf("menu2_icon_up")!=-1){//包含
						//alert("ss");
						bgImg.src="../images/menu2_icon_down.gif";
					}
					else{
						//alert(bgImg.src.search(re));
						bgImg.src="../images/menu2_icon_up.gif";
					}
					*/
					
				 }
			//]]> 
		</script>
   </head>
	<body>
		<!-- 菜单 -->
		<h:form>
		<div id="left" style="background-color:#FFF;">
				<ul>
				<div >
					<li class="menu2_click">
							<h3 style="height:25px;"><a href="#" onclick="tableImg('personInfo','quickEntrace','quickEntrace1')"><span><img id="personInfo" src="../images/menu2_icon_down.gif" /></span>个人信息</a></h3>
							<div style="background-color:#fff;">
							
								<ul class="menu3_ul">
									<li class="menu3" onclick="sel(this);" id="home_0">
									<!-- <a href="#{facesContext.externalContext.requestContextPath}/selfInfoManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>个人资料修改</a>-->
									<h:commandLink value="" action="#{LoginBB.toSelfInfoPage}" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>个人资料修改</h:commandLink> 
									</li>
									<li class="menu3" onclick="sel(this);" id="home_1">
									<!-- <a href="#{facesContext.externalContext.requestContextPath}/selfPassManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_up.gif" /></span>密码修改</a> -->
									<h:commandLink value="" action="#{LoginBB.toSelfPasswordPage}" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>密码修改</h:commandLink> 
									</li>
								</ul>
							</div>
					</li>
				</div>
				<div id="div_menu2" >
					
					<li class="menu2_click">
						<h3 style="height:25px;"><a href="#" onclick="tableImg('quickEntrace','personInfo','quickEntrace1')"><span><img id="quickEntrace" src="../images/menu2_icon_up.gif" /></span>快速入口</a></h3>
							<div style="background-color:#fff;">
								<ul class="menu3_ul">
									<li style="display:#{LoginBB.tp_userlevel==3?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeRequire/requireManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/testeeRequire/requireManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>提出培训需求</a>
									</li>
									<li style="display:#{LoginBB.tp_userlevel==3?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeTypicalcase/typicalcaseManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/testeeTypicalcase/typicalcaseManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>查看典型案例</a>
									</li>
									<li style="display:#{LoginBB.tp_userlevel==3?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeTrainplan/trainManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/testeeTrainplan/trainManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>查看培训注册</a>
									</li>
									<li style="display:#{LoginBB.tp_userlevel==3?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeTrainplan/trainManagement.faces">
									<h:commandLink action="#{TrainBB.queryTrainplansNew}" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>我的新培训<h:outputLabel id="trainplanSize" style="border:none;color:blue;background-color: #ff9fff" value="【#{LoginBB.trainplanSize}】" /></h:commandLink> 
									<h:commandLink action="#{QualifyforBB.queryExaminebankNew}" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>我的新考核<h:outputLabel id="examinebankSize" style="border:none;color:blue;background-color: #ff9fff" class="style_input" value="【#{LoginBB.examinebankSize}】" /></h:commandLink> 
									
									<a4j:poll interval="#{LoginBB.tp_userlevel==3?'3000':''}" action="#{LoginBB.queryTrainplansByAccountNewSize}" reRender="trainplanSize" ></a4j:poll>
									<a4j:poll interval="#{LoginBB.tp_userlevel==3?'3000':''}" action="#{LoginBB.queryExaminebanksByAccountNew}" reRender="examinebankSize"></a4j:poll>
									</li>
									
									
									
									
									
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/train/trainAdd.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/train/trainAdd.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>发布培训方案</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/selfhelp/courseware/coursewareAdd.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/selfhelp/courseware/coursewareAdd.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>上传课件</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/typicalcase/typicalcaseManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/typicalcase/typicalcaseManagement.faces"  target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>查看典型案例</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/require/requireManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/require/requireManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>培训需求处理</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/train/trainManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/train/trainManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>查看培训注册</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/train/qualifyfor/qualifyforManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/train/qualifyfor/qualifyforManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>查看考试成绩</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3"  onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/train/qualifyfor/qualifyforManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/train/qualifyfor/qualifyforManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>改分</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3"  onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/train/qualifyfor/qualifyforManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/privilege/loginLogManagement.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>用户登录时长</a>
									</li>
								</ul>
							</div>
					</li>
				</div>
				<div >
					<li class="menu2_click" style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" >
							<h3 style="height:25px;"><a href="#" onclick="tableImg('quickEntrace1','personInfo','quickEntrace')"><span><img id="quickEntrace1" src="../images/menu2_icon_down.gif" /></span>报表</a></h3>
							<div style="background-color:#fff;">
								<ul class="menu3_ul">
									<!-- <li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeRequire/requireManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/report/trainEligible.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>培训合格率</a>
									</li> -->
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeRequire/requireManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/report/testee.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>坐席培训课程量</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeRequire/requireManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/report/eligible.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>合格率</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeRequire/requireManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/report/cover.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>覆盖率</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeRequire/requireManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/report/error.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>考题差错率</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeRequire/requireManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/report/gross.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>培训课程和课件总量</a>
									</li>
									<li style="display:#{(LoginBB.tp_userlevel==1)||(LoginBB.tp_userlevel==2) ?'yes':'none'}" class="menu3" onclick="sel(this);" id="left_#{facesContext.externalContext.requestContextPath}/xhtml/testeeRequire/requireManagement.faces">
									<a href="#{facesContext.externalContext.requestContextPath}/xhtml/report/require.faces" target="rightFrame"><span><img src="../images/menu3_icon_down.gif" /></span>培训需求处理表</a>
									</li>
								</ul>
							</div>
					</li>
				</div>
				</ul>
		</div>	
		<!--  <a4j:poll interval="3000" oncomplete="refresh()"></a4j:poll>-->
		</h:form>
	</body>
</html>
